<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>本地部署 Deepseek：使用 Ollama 实现高效推理</title>
    <link href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <link href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            min-height: 100vh;
        }
        
        .hero-gradient {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }
        
        .card-hover {
            transition: all 0.3s ease;
        }
        
        .card-hover:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 40px rgba(0,0,0,0.1);
        }
        
        .text-gradient {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        
        .drop-cap {
            float: left;
            font-size: 4rem;
            line-height: 1;
            font-weight: 700;
            margin-right: 0.5rem;
            margin-top: 0.2rem;
            color: #667eea;
        }
        
        .section-divider {
            height: 2px;
            background: linear-gradient(to right, transparent, #667eea, transparent);
            margin: 3rem 0;
        }
        
        .code-block {
            background: #1e1e1e;
            color: #d4d4d4;
            border-radius: 0.5rem;
            padding: 1.5rem;
            overflow-x: auto;
            position: relative;
        }
        
        .code-block::before {
            content: attr(data-lang);
            position: absolute;
            top: 0.5rem;
            right: 0.5rem;
            font-size: 0.75rem;
            color: #888;
            text-transform: uppercase;
        }
        
        .feature-icon {
            width: 60px;
            height: 60px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 50%;
            color: white;
            font-size: 1.5rem;
            margin-bottom: 1rem;
        }
        
        .timeline-item {
            position: relative;
            padding-left: 3rem;
            margin-bottom: 2rem;
        }
        
        .timeline-item::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            width: 2px;
            height: 100%;
            background: #667eea;
        }
        
        .timeline-item::after {
            content: '';
            position: absolute;
            left: -4px;
            top: 0.5rem;
            width: 10px;
            height: 10px;
            background: #667eea;
            border-radius: 50%;
        }
        
        .mermaid {
            display: flex;
            justify-content: center;
            margin: 2rem 0;
        }
        
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .animate-fadeInUp {
            animation: fadeInUp 0.6s ease-out;
        }
    </style>
</head>
<body>
    <!-- Hero Section -->
    <section class="hero-gradient text-white py-20">
        <div class="container mx-auto px-6">
            <div class="max-w-4xl mx-auto text-center animate-fadeInUp">
                <h1 class="text-5xl md:text-6xl font-bold mb-6">
                    本地部署 Deepseek
                </h1>
                <p class="text-xl md:text-2xl mb-8 opacity-90">
                    使用 Ollama 实现高效推理，掌控你的 AI 模型
                </p>
                <div class="flex justify-center space-x-4">
                    <div class="bg-white bg-opacity-20 rounded-lg px-6 py-3">
                        <i class="fas fa-shield-alt mr-2"></i>数据隐私保护
                    </div>
                    <div class="bg-white bg-opacity-20 rounded-lg px-6 py-3">
                        <i class="fas fa-tachometer-alt mr-2"></i>低延迟高性能
                    </div>
                    <div class="bg-white bg-opacity-20 rounded-lg px-6 py-3">
                        <i class="fas fa-coins mr-2"></i>成本可控
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Main Content -->
    <main class="container mx-auto px-6 py-12">
        <!-- Introduction -->
        <section class="max-w-4xl mx-auto mb-16">
            <div class="bg-white rounded-2xl shadow-xl p-8 card-hover">
                <p class="text-lg leading-relaxed text-gray-700">
                    <span class="drop-cap">在</span>人工智能和深度学习领域，模型推理是一个至关重要的环节。随着模型规模的增大和计算需求的提升，如何在本地环境中高效部署和运行模型成为了许多开发者和技术爱好者的关注点。Deepseek 是一个专注于高性能推理的框架，而 Ollama 是一个简单易用的工具，能够帮助我们在本地环境中快速部署和运行模型。
                </p>
            </div>
        </section>

        <!-- Why Local Deployment -->
        <section class="mb-16">
            <h2 class="text-4xl font-bold text-center mb-12 text-gradient">为什么要本地部署 Deepseek？</h2>
            
            <div class="grid md:grid-cols-2 gap-8">
                <div class="bg-white rounded-xl shadow-lg p-8 card-hover">
                    <div class="feature-icon">
                        <i class="fas fa-lock"></i>
                    </div>
                    <h3 class="text-2xl font-bold mb-4 text-gray-800">数据隐私与安全</h3>
                    <ul class="space-y-3 text-gray-600">
                        <li class="flex items-start">
                            <i class="fas fa-check-circle text-purple-600 mt-1 mr-3"></i>
                            <span><strong>数据隐私：</strong>在本地部署模型可以避免将敏感数据传输到云端，确保数据隐私。</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check-circle text-purple-600 mt-1 mr-3"></i>
                            <span><strong>安全性：</strong>本地部署减少了网络攻击的风险，适合处理高安全性要求的任务。</span>
                        </li>
                    </ul>
                </div>

                <div class="bg-white rounded-xl shadow-lg p-8 card-hover">
                    <div class="feature-icon">
                        <i class="fas fa-rocket"></i>
                    </div>
                    <h3 class="text-2xl font-bold mb-4 text-gray-800">低延迟与高性能</h3>
                    <ul class="space-y-3 text-gray-600">
                        <li class="flex items-start">
                            <i class="fas fa-check-circle text-purple-600 mt-1 mr-3"></i>
                            <span><strong>低延迟：</strong>本地部署消除了网络传输的延迟，特别适合实时推理任务。</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check-circle text-purple-600 mt-1 mr-3"></i>
                            <span><strong>高性能：</strong>本地硬件资源可以完全用于模型推理，无需与其他用户共享。</span>
                        </li>
                    </ul>
                </div>

                <div class="bg-white rounded-xl shadow-lg p-8 card-hover">
                    <div class="feature-icon">
                        <i class="fas fa-dollar-sign"></i>
                    </div>
                    <h3 class="text-2xl font-bold mb-4 text-gray-800">成本控制</h3>
                    <ul class="space-y-3 text-gray-600">
                        <li class="flex items-start">
                            <i class="fas fa-check-circle text-purple-600 mt-1 mr-3"></i>
                            <span><strong>节省云服务费用：</strong>本地部署避免了按需付费的云服务成本。</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check-circle text-purple-600 mt-1 mr-3"></i>
                            <span><strong>硬件利用率高：</strong>可以充分利用现有的硬件资源，避免资源浪费。</span>
                        </li>
                    </ul>
                </div>

                <div class="bg-white rounded-xl shadow-lg p-8 card-hover">
                    <div class="feature-icon">
                        <i class="fas fa-cogs"></i>
                    </div>
                    <h3 class="text-2xl font-bold mb-4 text-gray-800">灵活性与可控性</h3>
                    <ul class="space-y-3 text-gray-600">
                        <li class="flex items-start">
                            <i class="fas fa-check-circle text-purple-600 mt-1 mr-3"></i>
                            <span><strong>完全控制：</strong>本地部署允许你完全控制模型的运行环境和配置。</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check-circle text-purple-600 mt-1 mr-3"></i>
                            <span><strong>快速迭代：</strong>可以随时修改和优化模型，无需依赖外部服务。</span>
                        </li>
                    </ul>
                </div>
            </div>
        </section>

        <div class="section-divider"></div>

        <!-- Benefits Visualization -->
        <section class="mb-16">
            <h2 class="text-4xl font-bold text-center mb-12 text-gradient">本地部署的优势</h2>
            
            <div class="bg-white rounded-2xl shadow-xl p-8">
                <div class="mermaid">
                    graph TD
                        A[本地部署 Deepseek] --> B[快速启动]
                        A --> C[易于调试]
                        A --> D[离线运行]
                        A --> E[完全控制]
                        
                        B --> F[无需复杂配置]
                        C --> G[实时监控性能]
                        D --> H[无网络依赖]
                        E --> I[自定义优化]
                        
                        style A fill:#667eea,stroke:#764ba2,stroke-width:3px,color:#fff
                        style B fill:#f3e5f5,stroke:#9c27b0
                        style C fill:#f3e5f5,stroke:#9c27b0
                        style D fill:#f3e5f5,stroke:#9c27b0
                        style E fill:#f3e5f5,stroke:#9c27b0
                </div>
            </div>
        </section>

        <div class="section-divider"></div>

        <!-- Installation Guide -->
        <section class="mb-16">
            <h2 class="text-4xl font-bold text-center mb-12 text-gradient">使用 Ollama 部署 Deepseek</h2>
            
            <div class="max-w-4xl mx-auto">
                <!-- Environment Preparation -->
                <div class="bg-white rounded-xl shadow-lg p-8 mb-8">
                    <h3 class="text-2xl font-bold mb-6 flex items-center">
                        <i class="fas fa-server text-purple-600 mr-3"></i>
                        环境准备
                    </h3>
                    <div class="grid md:grid-cols-2 gap-6">
                        <div>
                            <h4 class="font-semibold text-lg mb-3">操作系统要求</h4>
                            <p class="text-gray-600">支持 Linux 和 macOS（Windows 用户可以使用 WSL）</p>
                        </div>
                        <div>
                            <h4 class="font-semibold text-lg mb-3">硬件要求</h4>
                            <ul class="text-gray-600 space-y-2">
                                <li><i class="fas fa-microchip text-purple-500 mr-2"></i>CPU：支持 AVX2 指令集</li>
                                <li><i class="fas fa-memory text-purple-500 mr-2"></i>内存：至少 8GB RAM</li>
                                <li><i class="fas fa-hdd text-purple-500 mr-2"></i>存储：至少 10GB 可用空间</li>
                            </ul>
                        </div>
                    </div>
                </div>

                <!-- Installation Steps -->
                <div class="space-y-6">
                    <div class="timeline-item">
                        <div class="bg-white rounded-xl shadow-lg p-6">
                            